*** Do File for Paper ***

* Table 1 & Table 2 are counts from content analyses of newspapers

*There are 165 unrepresentative, unweighted cases. The 2019 ANES Pilot guide recommends not analyzing them.

*Table 3*
clear
use "C:\Users\davidmacdonald\Dropbox\Final PGI Legal vs. Illegal Immigration Attitudes\Clean ANES 2019 Pilot.dta"
use "C:\Users\David Macdonald\Dropbox\Final PGI Legal vs. Illegal Immigration Attitudes\Clean ANES 2019 Pilot.dta"

reg Immig_Levels01 FT_legal01 Age College Female White Republican if Weight!=. & Form==2, r 
outreg2 using tab.tex, dec(3) replace
reg Immig_Levels01 FT_illegal01 Age College Female White Republican if Weight!=. & Form==2, r 
outreg2 using tab.tex, dec(3) append
reg Immig_Levels01 FT_legal01 FT_illegal01 Age College Female White Republican if Weight!=. & Form==2, r 
outreg2 using tab.tex, dec(3) append 

reg Refugee_Allowance01 FT_legal01 Age College Female White Republican if Weight!=. & Form==2, r 
outreg2 using tab.tex, dec(3) append 
reg Refugee_Allowance01 FT_illegal01 Age College Female White Republican if Weight!=. & Form==2, r 
outreg2 using tab.tex, dec(3) append 
reg Refugee_Allowance01 FT_legal01 FT_illegal01 Age College Female White Republican if Weight!=. & Form==2, r 
outreg2 using tab.tex, dec(3) append

*Table 4*
clear
use "C:\Users\davidmacdonald\Dropbox\Final PGI Legal vs. Illegal Immigration Attitudes\Clean ANES 2019 Pilot.dta"
use "C:\Users\David Macdonald\Dropbox\Final PGI Legal vs. Illegal Immigration Attitudes\Clean ANES 2019 Pilot.dta"

reg Diff_FT_Trump_minus_Biden FT_legal01 FT_illegal01 Scale_Policy_Conservatism01 Retro_Econ01 Pid7_01 [pweight=Weight] 
outreg2 using tab.tex, dec(3) replace

reg Diff_FT_Trump_minus_Buttigieg FT_legal01 FT_illegal01 Scale_Policy_Conservatism01 Retro_Econ01 Pid7_01 [pweight=Weight]
outreg2 using tab.tex, dec(3) append

reg Diff_FT_Trump_minus_Harris FT_legal01 FT_illegal01 Scale_Policy_Conservatism01 Retro_Econ01 Pid7_01 [pweight=Weight]
outreg2 using tab.tex, dec(3) append

reg Diff_FT_Trump_minus_Sanders FT_legal01 FT_illegal01 Scale_Policy_Conservatism01 Retro_Econ01 Pid7_01 [pweight=Weight] 
outreg2 using tab.tex, dec(3) append

reg Diff_FT_Trump_minus_Warren FT_legal01 FT_illegal01 Scale_Policy_Conservatism01 Retro_Econ01 Pid7_01 [pweight=Weight]
outreg2 using tab.tex, dec(3) append

*Table 5*
clear
use "C:\Users\davidmacdonald\Dropbox\Final PGI Legal vs. Illegal Immigration Attitudes\Clean GSS 1994.dta"
use "C:\Users\David Macdonald\Dropbox\Final PGI Legal vs. Illegal Immigration Attitudes\Clean GSS 1994.dta"

reg Dont_Decrease_Immig Legal_Immig_Stypes_01 Illegal_Immig_Stypes_01 Age College Female White Born_USA Republican , r
outreg2 using tab.tex, dec(3) replace 

*Table 6*
clear
use "C:\Users\davidmacdonald\Dropbox\Final PGI Legal vs. Illegal Immigration Attitudes\Clean GSS 1994.dta"
use "C:\Users\David Macdonald\Dropbox\Final PGI Legal vs. Illegal Immigration Attitudes\Clean GSS 1994.dta"

cor Legal_Immig_Stypes Hispanics_Stypes
cor Illegal_Immig_Stypes Hispanics_Stypes

clear
use "C:\Users\davidmacdonald\Dropbox\Final PGI Legal vs. Illegal Immigration Attitudes\Clean ANES 2019 Pilot.dta"
use "C:\Users\David Macdonald\Dropbox\Final PGI Legal vs. Illegal Immigration Attitudes\Clean ANES 2019 Pilot.dta"

cor FT_legal FT_Mexico if Weight!=. & Form==2
cor FT_illegal FT_Mexico if Weight!=. & Form==2



